﻿using System;
using System.ComponentModel.DataAnnotations;
using System.Runtime.Serialization;
using KC.DTO.Core;
using ProtoBuf;

namespace KC.Service.Core.DTO.WorkFlow
{
    [Serializable, DataContract(IsReference = true)]
    [ProtoContract(ImplicitFields = ImplicitFields.AllPublic)]
    public class FlowTypesDto : TreeNodeDTO<FlowTypesDto>
    {

        public FlowTypesDto ParentText { get; set; }

        /// <summary>
        /// 页面展示使用
        /// </summary>
        [DataMember]
        public string CreateTime
        {
            get
            {
                return CreatedDate.AddHours(8).ToString("yyyy-MM-dd HH:mm:ss");
            }
        }
        /// <summary>
        /// 页面展示使用
        /// </summary>
        [DataMember]
        public string ModifyTime
        {
            get
            {
                return ModifiedDate.AddHours(8).ToString("yyyy-MM-dd HH:mm:ss");
            }
        }
        [DataMember]
        [Display(Name = "类别排序")]
        public int Rank { get; set; }
        [DataMember]
        [Display(Name = "备注")]
        [MaxLength(200,ErrorMessage = "输入{0}超长，最大可输入长度200")]
        public string Remark { get; set; }
    }
}
